<template>
  <div>
    <div class="title_name">
      摄像头漏洞类型统计
    </div>
    <div class="image-container">
      <div class="image-item">
        <img
          :src="require('@/assets/xd/new/applicationScreen32.png')"
          alt="Image 1"
        />
        <div class="image-text1">{{ loopholeType[0]?loopholeType[0].count:0 }}</div>
      </div>
      <div class="image-item">
        <img

          :src="require('@/assets/xd/new/applicationScreen31.png')"
          alt="Image 2"
        />
        <div class="image-text2">{{ loopholeType[1]?loopholeType[1].count:0 }}</div>
      </div>
      <div class="image-item">
        <img
          :src="require('@/assets/xd/new/applicationScreen33.png')"
          alt="Image 3"
        />
        <div class="image-text1">{{ loopholeType[2]?loopholeType[2].count:0 }}</div>
      </div>
    </div>
    <div class="image-container">
      <div class="image-item1">
        <img
          :src="require('@/assets/xd/new/applicationScreen34.png')"
          alt="Image 4"
        />
        <div class="image-text">{{ loopholeType[0]?loopholeType[0].camera_loophole:"" }}</div>
      </div>
      <div class="image-item1" style="margin-top: 20px">
        <img
          :src="require('@/assets/xd/new/applicationScreen34.png')"
          alt="Image 5"
        />
        <div class="image-text">{{ loopholeType[1]?loopholeType[1].camera_loophole:"" }}</div>
      </div>
      <div class="image-item1">
        <img
          :src="require('@/assets/xd/new/applicationScreen34.png')"
          alt="Image 6"
        />
        <div class="image-text">{{ loopholeType[2]?loopholeType[2].camera_loophole:"" }}</div>
      </div>
    </div>
  </div>
</template>
<script>
import { getLoopholeType } from "@/api/system/info";

export default {
  data() {
    return {
      loopholeType: [],
    };
  },
  mounted() {
    getLoopholeType().then((res) => {
      if (res.code == 200) {
        this.loopholeType = res.data;
      }
    });
  },
};
</script>
<style scoped>
.title_name{
    font-size: 16px; 
    font-weight: bold;
    color: rgb(255, 255, 255);
    margin-top: 10px;
}
.image-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.image-item {
  position: relative;
  text-align: center;
  top: 20px;
}
.image-item img {
  width: 90% !important;
  /* 设置图片宽度为50% */
  height: auto !important;
  /* 保持图片的宽高比 */
}
.image-item1 img {
  width: 100% !important;
  /* 设置图片宽度为50% */
  height: auto !important;
  /* 保持图片的宽高比 */
}
.image-item1 {
  position: relative;
  text-align: center;
  top: 30px;
}

.image-item img {
  width: 140px;
  height: auto;
  margin-top: 20px;
}
.image-item1 img {
  width: 140px;
  height: auto;
}

.image-text {
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  color: white;
  font-weight: bold;
  font-size: 16px;
  padding: 10px;
  margin: 0;
  white-space: nowrap;
}
.image-text1 {
  position: absolute;
  bottom: 50px;
  left: 0;
  right: 0;
  color: white;
  font-weight: bold;
  font-size: 30px;
  padding: 5px;
  margin: 0;
}

.image-text2 {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  color: white;
  font-weight: bold;
  font-size: 35px;
  padding: 5px;
  margin: 0;
}
</style>
